import type {PluginOption} from 'vite'
import Vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'
import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'
import AutoImport from 'unplugin-auto-import/vite'


/**
 * 获取vite插件
 * @returns 返回插件集合
 */
export default function loadVitePlugins() {
    const plugins: PluginOption[] = [Vue(),Components({
        resolvers:[ElementPlusResolver()]
    }),AutoImport({imports:['vue','vue-router','pinia']})]
    return plugins
}